/*
 * Copyright [2008]. Sherwin zhu. sherwinzhu@126.com
 *
 * http://www.gnu.org/licenses/lgpl-3.0.txt
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TB.Web.UI.WebControls
{
    [ViewStateModeById]
    [ToolboxItem(false)]
    public class TreeGridChildTable : Table, System.Web.UI.INamingContainer
    {
        public TreeGridChildTable(string parentID) : base()
        {
            this.parentID = parentID;
        }

        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);

            if (!String.IsNullOrEmpty(parentID))
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Id, parentID);
            }
        }

        private string parentID;
    }
}
